package com.br.sae.controls;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.br.sae.conexaobd.SistemaDAO;
import com.br.sae.model.entitys.Turma;

public class LogicaSetTurma implements Logica{

	@Override
	public String executa(HttpServletRequest req, HttpServletResponse res)
			throws Exception {
		int id = Integer.valueOf(req.getParameter("id"));
		SistemaDAO sistemaDAO = new SistemaDAO();
		Turma turma = (Turma) sistemaDAO.find(Turma.class, id);
		req.setAttribute("turma", turma);
		return "cadastro_turma.jsp?Metodo=alterarTurma";
	}
	
	

}
